package com.piaohailin.feature.generic;

public class SwapT <T>{

    public SwapT(T i, T j){
        T temp;
        temp = i;
        i = j;
        j = temp;

        System.out.println("初始化 i = " + i +"； j = "+j);
    }

    public static void main(String[] args) {
//        int i = 1;
//        int j = 2;
//        SwapT<Integer> swap = new SwapT(i,j);

        String i = "111111";
        String j = "2";
        SwapT<String> swap = new SwapT(i,j);

        System.out.println("main  i = " + i +"； j = "+j);
    }
}
